    <!DOCTYPE>  
      
    <html>  
    <head runat="server">  
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
        <meta charset="UTF-8">  
        <meta name="viewport" content="width=device-width, initial-scale=1">  
        <script src="/SmartCommunity/js/wechat/jquery-2.2.0.min.js"></script> 
        <title>支付宝支付</title>  
        <style type="text/css">  
            *{margin:0; padding:0;}  
            img{max-width: 100%; height: auto;}  
            .test{height: 600px; max-width: 600px; font-size: 40px; margin-top:250px;}  
        </style>  
  
    </head>  
    <body>  
        <form id="form1" runat="server">  
            <div class="test" >  
                由于支付宝不能直接在微信中进行支付，请按照提示信息进行支付!  
            </div>  
        </form>  
		        <script type="text/javascript">   
            function is_weixin() {  
                var ua = navigator.userAgent.toLowerCase();  
                if (ua.match(/MicroMessenger/i) == "micromessenger") {  
                    return true;  
                } else {  
                    return false;  
                }  
            }  
            var isWeixin = is_weixin();  
			alert(isWeixin);
            var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;  
            console.log(winHeight); 
			ShowWindow(); 			
            function loadHtml() {  
                var div = document.createElement('div');  
                div.id = 'weixin-tip';  
                div.innerHTML = '<p><img src="/Images/live_weixin.png" alt="微信打开"/></p>';  
                document.body.appendChild(div);  
            }  
      
            function loadStyleText(cssText) {  
                var style = document.createElement('style');  
                style.rel = 'stylesheet';  
                style.type = 'text/css';  
                try {  
                    style.appendChild(document.createTextNode(cssText));  
                } catch (e) {  
                    style.styleSheet.cssText = cssText; //ie9以下  
                }  
                var head = document.getElementsByTagName("head")[0]; //head标签之间加上style样式  
                head.appendChild(style);  
            }  
      
            function ShowWindow() {  
                var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";  
                if (isWeixin) {  
                    loadHtml();  
                    loadStyleText(cssText);  
                } else {  
				
                    $(".test").css("display","none");				
                }  
            }  
      
      
                
     
        </script>
    </body>  
    </html>  